<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>时间</title>
    <script>
        var d = new Date();
        console.log(d);
        console.log("年："+d.getFullYear()+",月" + d.getMonth()+ "星期" + d.getDay());

        var d1 = new Date("2020/8/28")
        console.log(d1)

        console.log(d.toLocaleDateString());
    </script>
</head>
<body>

</body>
</html>